FROM tomcat:8.5.38-jre8

ADD fonts.tgz /usr/share/fonts

RUN sed -i "$((`sed -n '/^\# OS specific support/{=}' /usr/local/tomcat/bin/catalina.sh` - 2))aJAVA_OPTS=\" -Xms1024m -Xmx1024m  -XX:PermSize=512m -XX:MaxPermSize=512m -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=\${active} -Dfile.encoding=UTF-8\"" /usr/local/tomcat/bin/catalina.sh

VOLUME [ "/usr/local/tomcat/webapps", "/usr/local/tomcat/logs"]

EXPOSE 8080

WORKDIR /usr/local/tomcat

ENTRYPOINT [ "/usr/local/tomcat/bin/catalina.sh", "run"] 